package org.kent.w.base.common.validate;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.kent.w.base.common.validate.constraints.IntEnumValue;
import org.kent.w.base.common.validate.constraints.LongEnumValue;
import org.kent.w.base.common.validate.constraints.StringEnumValue;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * test
 *
 * @author wujigang
 * @date 2019/9/17
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Car {

    @NotNull(message = "不能为空")
    private String manufacturer;

    @NotBlank
    private String licensePlate;

    @Min(1)
    private int seatCount;

    @IntEnumValue(enumClass = AIntEnum.class, message = "AInt枚举类型不正确")
    private Integer a;

    @LongEnumValue(enumClass = ALongEnum.class, message = "ALong枚举类型不正确")
    private Long b;

    @StringEnumValue(enumClass = AStringEnum.class, message = "AString枚举类型不正确")
    private String c;
}
